/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package java1;

/**
 *
 * @author Yu
 */
import java.io.*;
public class IO1 {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) throws Exception {
	FileOutputStream fout = new FileOutputStream("data1.txt");
	BufferedOutputStream bout =new BufferedOutputStream(fout);
	DataOutputStream dout=new DataOutputStream(bout);
	dout.writeInt(5);
	dout.writeBoolean(true);
	dout.writeUTF("Hello YU");
	dout.close();
	bout.close();
	fout.close();
    }

}
